﻿using XNAFight.Scene.Core;
using XNAFight.Scene.ToolAnime;
using Microsoft.Xna.Framework;
using System;

namespace XNAFight.Scene.OutGame
{
    class ToolsMenu : MenuScreen
    {
        public ToolAnimeCharacterSelect to_ToolAnime;
        
        public ToolsMenu(string _title)
            : base(_title)
        {
            items = new TextMenuItem[1, 3];

            to_ToolAnime = new ToolAnimeCharacterSelect();

            MenuItem anime_MI = new TextMenuItem(new Vector2(20, 70), "Tests Animations", 0.8f);
            MenuItem retour_MI = new TextMenuItem(new Vector2(20, 110), "Retour", 0.8f);

            items[0, 0] = anime_MI;
            items[0, 1] = retour_MI;

            anime_MI.Selected += Complete;
            anime_MI.Selected += to_ToolAnime.Add;
            to_ToolAnime.Cancelled += this.Add;

            this.Added += this.Activate;
            this.Removed += this.Disable;

            this.Adding += this.Reset;

            retour_MI.Selected += this.Cancel;            
            this.Cancelling += this.Cancel;
        }

        public override void Reset()
        {
            base.Reset();
            complete = false;
        }

        public override void Draw(GameTime _game_time)
        {
            GraphicsDevice.Clear(Color.White);

            base.Draw(_game_time);
        }
    }
}
